﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PK2
{
    internal class PKContext
    {
        private static PKContext _context;

        private Dictionary<string, object> _bag;
        private PKPluginsController _controller;

        internal static PKContext Current
        { 
            get
            {
                if (_context == null)
                    _context = new PKContext();
                return _context;
            }
        }

        private PKContext()
        {

        }

        public object this[string key]
        {
            get 
            {
                return _bag[key];
            }

            set
            {
                _bag[key] = value;
            }
        }

        public PKPluginsController Controller
        {
            get
            {
                if (_controller == null)
                    _controller = new PKPluginsController();

                return _controller;
            }

        }

    }
}
